Ext.define('DCApp.view.figureuk.Detail', {
	extend: 'DCApp.view.Detail',
    alias: 'widget.figureukdetail',
    
    bind: {
        title: '人物 - 【{theObj.objId}】'
    },
    
    componentCls: 'figureuk-detail',
    bodyPadding: 0,
    
    controller: 'detail',
   
    
    afterRender: function(ct, position) {
    	this.callParent();
    },
    items: [
    	{
    		listeners: {
				render: function(p) {
					p = p.getEl();
					var me = this.up();
					me.h0 = p.getHeight();
			    	p.on('scroll', function(e, t) {
			    		me.onscroll(t.scrollTop,t.clientHeight);
			    	}, p);
			  	}
			},
    		title: 'Panel 0',
        	flex: 2,
        	frame: false,
        	xtype: 'container',
        	layout: 'anchor',
        	style: {
            	overflow: 'auto'
        	},
        	items: [{        		
        		title : '人物信息',
				margin : '0 0 10 0',
				cls : 'nav_pos',
				reference : 'form',
				bodyPadding : 10,
				fieldDefaults : {
					labelAlign : 'right',
					labelWidth : 100,
					padding : 3
				},
				defaults : {
					anchor : '100%'
				},
				xtype: 'form',
				items: [
					{
                        xtype: 'container',
                        layout: 'hbox',
                        combineErrors: true,
                        defaultType: 'textfield',
                        items:[
                			{
                        		flex: 1,
		                        xtype: 'displayfield',
		                        fieldLabel: '编号',
		                        allowBlank: false,
		                        bind: '{theObj.objId}',
		                        publishes: ['value']
		                    },
		                    {
		                    	flex: 1,
		                        xtype: 'textfield',
		                        fieldLabel: '姓名',
		                        allowBlank: false,
		                        bind: '{theObj.name}',
		                        publishes: ['value']
		                    }		                        
                		]
            		},
            		{
                        xtype: 'container',
                        layout: 'hbox',
                        combineErrors: true,
                        defaultType: 'textfield',
                        items:[
                			{
                        		flex: 1,
		                        xtype: 'textfield',
		                        fieldLabel: '作者',
		                        allowBlank: false,
		                        bind: '{theObj.author}',
		                        publishes: ['value']
		                    },
		                    {
		                    	flex: 1,
		                        xtype: 'textfield',
		                        fieldLabel: '分类',
		                        allowBlank: false,
		                        bind: '{theObj.className}',
		                        publishes: ['value']
		                    }		                        
                		]
            		},
            		{       
		            	xtype: 'htmleditor',
		            	bind: '{theObj.description}',
		            	publishes: ['value'],
		            	fieldLabel: '描述'                    		                    		
					}
				]
        	},
        	{
                    title: '影像列表',
                    margin: '0 0 10 0',
                    cls:'nav_pos',
                    layout:'fit',
                    items:[{
                    	bind: '{theObj.images}',
                    	xtype:'imgpanel',
                    	btns:['关联','删除']
                    }]                    
                },
			{
                title: '附件列表',
                cls:'nav_pos',
                layout:'fit',
                items:[{
                	bind:'{theObj.ceAttachments}',
                	xtype:'attachpanel'
                }]                    
            }]
        }
	]
});
